﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Text;

namespace SafeDoorService
{  
    /// <summary>
    /// 读卡器读取到的RFID信息
    /// </summary>
    public class RFIDBook : IComparable
    {
        public RFIDBook() { }
        public RFIDBook(string rfid, DateTime date) { this._rRID = rfid; this._readDate = date; }
        private string _rRID;
        /// <summary>
        /// 图书RFID信息
        /// </summary>
        public string RRID
        {
            get { return _rRID; }
            set { _rRID = value; }
        }

        private DateTime _readDate;

        /// <summary>
        /// 读取时间 yyyy-MM-dd HH:mm:ss
        /// </summary>
        public DateTime ReadDate
        {
            get { return _readDate; }
            set { _readDate = value; }
        }

        public int CompareTo(object obj)
        {
            return this.ReadDate.CompareTo(((RFIDBook)obj).ReadDate);
        }
    }
}
